import { createRouter, createWebHistory } from 'vue-router'
import errorRoute from "@/views/erropages/router"
import loginRoute from "@/views/logins/route"
import mainRoute from "@/views/main/route"
import headerRoute from "@/views/header/route"
const routes = [
  ...errorRoute,
  ...loginRoute,
  ...mainRoute,
  ...headerRoute,
  {
     path: '/:pathMatch(.*)',
     redirect: {
       name:'404'
     }
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
